package com.easyj.admin.sys.service;

import java.util.List;

import com.easyj.admin.db.model.Dirtionary;
import com.easyj.admin.db.model.DirtionaryItem;
import com.easyj.base.exception.EasyjException;



public interface DirtionaryService {

	public Dirtionary findById(Long id);

	public int  insertEntity(Dirtionary entity) throws EasyjException;
	public int  updateEntity(Dirtionary entity);
	
	

	//------------
	public int addItem(DirtionaryItem item) throws EasyjException;
	public int  updateItem( DirtionaryItem entity) throws EasyjException;
	public DirtionaryItem getItemById(Long id);
	/**
	 * 返回所有字典，包含字典条目
	 * @return
	 */
	public List<Dirtionary> getAllDirtionary();
	/**
	 * 取得字典项名 ，缓存
	 * @param parentCode
	 * @param itemCode
	 * @return
	 */
	public String getDirtionaryItemName(String parentCode,String itemCode);

	
	/**
	 * 根据字典编号取得可选项 ，缓存
	 * @param parentCode
	 * @return
	 */
	public List<DirtionaryItem> getDirtionaryItems(String parentCode);
	
	public  void  evictDirtionary( DirtionaryItem item);
	public void  evictDirtionaryItem( DirtionaryItem item);
	

}
